package com.cskaoyan.Utils;

import java.util.List;
import java.util.stream.Collectors;

public class ListLimit {


    public static <T> List limitList(List<T> list, String limit) {
        return list.stream().limit(Integer.parseInt(limit)).collect(Collectors.toList());
    }
}
